using System.Collections;
using System.Collections.Generic;
using UI;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

namespace UI
{
    public class UI_SelectPanel : BasePanel
    {
        public override EPanelAttr GetPanelAttr => EPanelAttr.None;
        public override EPanelLayer GetPanelLayer => EPanelLayer.Background;
        /*public void FirstSceneButton_Click()
        {
            GameManager.Instance.LoadScene("FirstScene");
            UIController.Instance.Show<UI_MainPanel>();
            Hide();
        }*/
        public void SecondSceneButton_Click()
        {
            GameManager.Instance.LoadScene("SecondScene");
            UIController.Instance.Show<UI_MainPanel>();
            Hide();
        }
        public void ThirdSceneButton_Click()
        {
            GameManager.Instance.LoadScene("ThirdScene");
            UIController.Instance.Show<UI_MainPanel>();
            Hide();
        }
        public void LastSceneButton_Click()
        {
            GameManager.Instance.LoadScene("LastScene");
            UIController.Instance.Show<UI_MainPanel>();
            Hide();
        }
        internal override void Init()
        {
            transform.Find("FirstScenebtn").GetComponent<Button>().onClick.AddListener(() =>
            {
                GameManager.Instance.LoadScene("FirstScene");
                UIController.Instance.Show<UI_MainPanel>();
                Hide();
            });
            transform.Find("ExitBtn").GetComponent<Button>().onClick.AddListener(() =>
            {
                UIController.Instance.Show<UI_MainTitlePanel>();
                Hide();
            });
        }
    }
}

